package win.demonlegion.module;

import com.alibaba.fastjson.annotation.JSONField;

import java.util.Date;

/**
 * Created by MK on 2017/6/18.
 * 用户基础Bean
 */
public class UserDetailBean  {

    private static final long serialVersionUID = -4073447348539449695L;

    private String id; // ID

    private String userId;// 用户ID

    private String nickName;// 昵称

    private Integer sex;// 性别 0为男性 1为女性

    private String constellation;// 星座

    private String birthday;// 生日

    private String city;// 城市

    private String height; // 身高

    private String weight; // 体重

    private String headPhoto; // 头像

    private String openId;

    private int sumFriends;  //好友数

    private int sumFollow;//关注数

    private int sumDynamic;//动态数

    private int sumFollower;//粉丝数

    private String persionSignature;//个性签名

    private int sumUnRead;//未读消息

    public int getSumUnRead() {
        return sumUnRead;
    }

    public void setSumUnRead(int sumUnRead) {
        this.sumUnRead = sumUnRead;
    }

    public int getSumDynamic() {
        return sumDynamic;
    }

    public void setSumDynamic(int sumDynamic) {
        this.sumDynamic = sumDynamic;
    }

    public int getSumFollower() {
        return sumFollower;
    }

    public void setSumFollower(int sumFollower) {
        this.sumFollower = sumFollower;
    }

    public String getPersionSignature() {
        return persionSignature;
    }

    public void setPersionSignature(String persionSignature) {
        this.persionSignature = persionSignature;
    }

    private String context;

    private String phone;

    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    private boolean followState = false; // 用户是否关注状态

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public boolean isFollowState() {
        return followState;
    }

    public void setFollowState(boolean followState) {
        this.followState = followState;
    }

    public String getContext() {
        return context;
    }

    public void setContext(String context) {
        this.context = context;
    }


    public int getSumFriends() {
        return sumFriends;
    }

    public void setSumFriends(int sumFriends) {
        this.sumFriends = sumFriends;
    }

    public int getSumFollow() {
        return sumFollow;
    }

    public void setSumFollow(int sumFollow) {
        this.sumFollow = sumFollow;
    }

    public String getOpenId() {
        return openId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    public String getHeadPhoto() {
        return headPhoto;
    }

    public void setHeadPhoto(String headPhoto) {
        this.headPhoto = headPhoto;
    }

    public String getHeight() {
        return height;
    }

    public void setHeight(String height) {
        this.height = height;
    }

    public String getWeight() {
        return weight;
    }

    public void setWeight(String weight) {
        this.weight = weight;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }


    /**
     * @return the sex
     */
    public Integer getSex() {
        return sex;
    }

    /**
     * @param sex the sex to set
     */
    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getConstellation() {
        return constellation;
    }

    public void setConstellation(String constellation) {
        this.constellation = constellation;
    }

    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public UserDetailBean() {
    }

    public UserDetailBean(String id, String userId, String nickName, String headPhoto, String openId) {
        super();
        this.id = id;
        this.userId = userId;
        this.openId = openId;
        this.nickName = nickName;
        this.headPhoto = headPhoto;
    }

    public UserDetailBean(String id, String userId, String nickName, String openId) {
        super();
        this.id = id;
        this.userId = userId;
        this.openId = openId;
        this.nickName = nickName;
    }

    @Override
    public String toString() {
        return "UserDetailBean{" +
                "id='" + id + '\'' +
                ", userId='" + userId + '\'' +
                ", nickName='" + nickName + '\'' +
                ", sex=" + sex +
                ", constellation='" + constellation + '\'' +
                ", birthday='" + birthday + '\'' +
                ", city='" + city + '\'' +
                ", height='" + height + '\'' +
                ", weight='" + weight + '\'' +
                ", headPhoto='" + headPhoto + '\'' +
                ", openId='" + openId + '\'' +
                ", sumFriends=" + sumFriends +
                ", sumFollow=" + sumFollow +
                ", sumDynamic=" + sumDynamic +
                ", sumFollower=" + sumFollower +
                ", persionSignature='" + persionSignature + '\'' +
                ", context='" + context + '\'' +
                ", phone='" + phone + '\'' +
                ", createTime=" + createTime +
                ", followState=" + followState +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        UserDetailBean that = (UserDetailBean) o;

        if (sumFriends != that.sumFriends) return false;
        if (sumFollow != that.sumFollow) return false;
        if (sumDynamic != that.sumDynamic) return false;
        if (sumFollower != that.sumFollower) return false;
        if (sumUnRead != that.sumUnRead) return false;
        if (followState != that.followState) return false;
        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (userId != null ? !userId.equals(that.userId) : that.userId != null) return false;
        if (nickName != null ? !nickName.equals(that.nickName) : that.nickName != null) return false;
        if (sex != null ? !sex.equals(that.sex) : that.sex != null) return false;
        if (constellation != null ? !constellation.equals(that.constellation) : that.constellation != null)
            return false;
        if (birthday != null ? !birthday.equals(that.birthday) : that.birthday != null) return false;
        if (city != null ? !city.equals(that.city) : that.city != null) return false;
        if (height != null ? !height.equals(that.height) : that.height != null) return false;
        if (weight != null ? !weight.equals(that.weight) : that.weight != null) return false;
        if (headPhoto != null ? !headPhoto.equals(that.headPhoto) : that.headPhoto != null) return false;
        if (openId != null ? !openId.equals(that.openId) : that.openId != null) return false;
        if (persionSignature != null ? !persionSignature.equals(that.persionSignature) : that.persionSignature != null)
            return false;
        if (context != null ? !context.equals(that.context) : that.context != null) return false;
        if (phone != null ? !phone.equals(that.phone) : that.phone != null) return false;
        return createTime != null ? createTime.equals(that.createTime) : that.createTime == null;

    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (userId != null ? userId.hashCode() : 0);
        result = 31 * result + (nickName != null ? nickName.hashCode() : 0);
        result = 31 * result + (sex != null ? sex.hashCode() : 0);
        result = 31 * result + (constellation != null ? constellation.hashCode() : 0);
        result = 31 * result + (birthday != null ? birthday.hashCode() : 0);
        result = 31 * result + (city != null ? city.hashCode() : 0);
        result = 31 * result + (height != null ? height.hashCode() : 0);
        result = 31 * result + (weight != null ? weight.hashCode() : 0);
        result = 31 * result + (headPhoto != null ? headPhoto.hashCode() : 0);
        result = 31 * result + (openId != null ? openId.hashCode() : 0);
        result = 31 * result + sumFriends;
        result = 31 * result + sumFollow;
        result = 31 * result + sumDynamic;
        result = 31 * result + sumFollower;
        result = 31 * result + (persionSignature != null ? persionSignature.hashCode() : 0);
        result = 31 * result + sumUnRead;
        result = 31 * result + (context != null ? context.hashCode() : 0);
        result = 31 * result + (phone != null ? phone.hashCode() : 0);
        result = 31 * result + (createTime != null ? createTime.hashCode() : 0);
        result = 31 * result + (followState ? 1 : 0);
        return result;
    }
}
